<template>
	<view class="order-pages" v-if="detail.id">

		<view class="ml-md mr-md mt-md pd-lg fill-base f-desc radius-16">
			<view class="text">异常类型</view>
			<view class="f-paragraph c-title mt-md">行为规范</view>
			<view class="text mt-md">差评原因</view>
			<view class="f-paragraph c-title mt-md">行为规范</view>
			<view class="text mt-md">客服处理意见</view>
			<view class="f-paragraph c-title mt-md">根据平台处罚条例，对该师傅处罚50元罚款，从师傅余额里扣除。</view>
			<view class="text mt-md">扣除金额</view>
			<view class="f-paragraph c-title mt-md">¥50.00</view>
		</view>

		<view class="ml-md mr-md mt-md pd-lg fill-base f-desc radius-16">
			<view class="flex-center">
				<view class="text">异常类型</view>
				<view class="flex-1 f-paragraph c-title">202312.08 12:08:10</view>
			</view>
			<view class="flex-center mt-lg">
				<view class="text">首次处理人</view>
				<view class="flex-1 f-paragraph c-title">xx</view>
			</view>
			<view class="flex-center mt-lg">
				<view class="text">是否已扣款</view>
				<view class="flex-1 f-paragraph c-title">xx</view>
			</view>
			<view class="flex-center mt-lg">
				<view class="text">最终处理意见</view>
				<view class="flex-1 flex-y-center f-paragraph c-title">xx<view
						class="agreen-btn flex-center f-icontext ml-md"
						:style="{color:primaryColor,borderColor:primaryColor}">同意</view>
				</view>
			</view>
			<view class="flex-center mt-lg">
				<view class="text">最终完成时间</view>
				<view class="flex-1 f-paragraph c-title">xx</view>
			</view>
			<view class="flex-center mt-lg">
				<view class="text">当前进度</view>
				<view class="flex-1 f-paragraph c-title">已处理</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		mapState,
		mapActions,
		mapMutations
	} from "vuex"
	export default {
		components: {},
		data() {
			return {
				options: {},
				detail: {}
			}
		},
		computed: mapState({
			primaryColor: state => state.config.configInfo.primaryColor,
			subColor: state => state.config.configInfo.subColor,
		}),
		onLoad(options) {
			this.options = options
			this.initIndex()
		},
		methods: {
			...mapActions(['getConfigInfo', 'getCoachInfo', 'toPlayAudio']),
			...mapMutations(['updateOrderItem']),
			async initIndex(refresh = false) {
				// #ifdef H5
				if (!refresh && this.$jweixin.isWechat()) {
					await this.$jweixin.initJssdk();
					this.$jweixin.wxReady(() => {
						this.$jweixin.hideOptionMenu()
					})
				}
				// #endif
				if (!this.configInfo.id) {
					await this.getConfigInfo()
				}
				let {
					id
				} = this.options
				let data = await this.$api.technician.orderInfo({
					id
				})
				this.$util.setNavigationBarColor({
					bg: this.primaryColor
				})
				data.is_balance = data.balance * 1 > 0 ? 1 : 0
				this.detail = data
			},
			initRefresh() {
				this.initIndex(true)
			}
		}
	}
</script>


<style lang="scss">
	.text {
		color: #777;
		width: 195rpx;
	}

	.agreen-btn {
		width: 76rpx;
		height: 36rpx;
		border-radius: 8rpx;
		border: 1rpx solid #fff;
	}
</style>